import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopUserStoreController } from '../../../controllers';
const uctoominishopUserStoreRouter = new Router();
const minishopUserStoreController = new uctooMinishopUserStoreController();

uctoominishopUserStoreRouter.post('/add', requireUser, minishopUserStoreController.add);
uctoominishopUserStoreRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_user_store'), minishopUserStoreController.edit);
uctoominishopUserStoreRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_user_store'), minishopUserStoreController.delete);

//For getting minishopUserStore with permission control
uctoominishopUserStoreRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_user_store'), minishopUserStoreController.getSingle);
uctoominishopUserStoreRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_user_store'), minishopUserStoreController.getMany);
uctoominishopUserStoreRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_user_store'), minishopUserStoreController.getMany);

//#endregion AutoCreateCode
export default uctoominishopUserStoreRouter;
